/*
 * @Author: windys
 * @Description: 
 * @Date: 2022-03-22 09:57:47
 */
import http from '@/utils/http.js'

// 商品列表
export const ApiGetMallList = (params) => {
    return http({
        method: 'get',
        url: `/mall/web/goods/list`,
        params
    })
}


// 商品订单详情
export const ApiGetMallOrlderDetail = (params) => {
    return http({
        method: 'get',
        url: `/mall/web/goods/order`,
        params
    })
}




// 积分明细列表
export const ApiGetScoreDetail = (params) => {
    return http({
        method: 'get',
        url: `/mall/web/score/list`,
        params
    })
}


// 订单列表-兑换记录
export const ApiGetDhScoreList = (params) => {
    return http({
        method: 'get',
        url: `/mall/web/order/list`,
        params
    })
}

// 查看订单物流信息
export const ApiGetExpressInfo = (params) => {
    return http({
        method: 'get',
        url: `/mall/web/express/info/byOrder`,
        params
    })
}


// 获取省市区地址列表
export const ApiGetArea = (params) => {
    return http({
        method: 'get',
        url: `/mall/web/area/list`,
        params
    })
}

// 某商品sku列表
export const ApiGetGoodSKU = (params) => {
    return http({
        method: 'get',
        url: `/mall/web/sku/list`,
        params
    })
}


// 收货地址添加
export const ApiAddAddr = (data) => {
    return http({
        method: 'POST',
        url: `/mall/web/receiver/addr/add`,
        data
    })
}

// 获取新增地址ID
export const ApiGetReceiverID = (params) => {
    return http({
        method: 'get',
        url: `/mall/web/receiver/get/id`,
        params
    })
}

// 收货地址修改
export const ApiPutAddr = (data) => {
    return http({
        method: 'POST',
        url: `/mall/web/receiver/addr/update`,
        data
    })
}

// 收货地址删除
export const ApiDelAddr = (data) => {
    return http({
        method: 'POST',
        url: `/mall/web/receiver/addr/del`,
        data
    })
}

// 商品删除
export const ApiDelGood = (data) => {
    return http({
        method: 'DELETE',
        url: `/mall/web/goods/del`,
        data
    })
}

// 设置默认收货地址
export const ApiSetDefaultAddr = (data) => {
    return http({
        method: 'POST',
        url: `/mall/web/receiver/addr/default`,
        data
    })
}

//获取某用户的收货地址列表
export const ApiGetAddrList = (params) => {
    return http({
        method: 'get',
        url: `/mall/web/receiver/addr/list`,
        params
    })
}

// 获取积分商城首页数据 /mall/web/goods/list /web/get/first/page
export const ApiMallHomeData = (params) => {
    return http({
        method: 'get',
        url: `/mall/web/goods/list`,
        params
    })
}

//积分商城下单到结算 
export const ApiGetMallOrderId = (data) =>{
    return http({
        method: 'POST',
        url: `/settlement/domain/mall/order/submit`,
        data
    })
}

// 品订单预支付
export  const ApiPayMallOrder = (data) =>{
    return http({
        method: 'POST',
        url: `/settlement/web/goods/order/prepay`,
        data
    })
}